package com.longqin.business.service.impl;

import com.longqin.business.entity.BusExamine;
import com.longqin.business.mapper.BusExamineMapper;
import com.longqin.business.service.IBusExamineService;
import com.longqin.business.util.OperationLog;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author longqin
 * @since 2025-01-07
 */
@Service
public class BusExamineServiceImpl extends ServiceImpl<BusExamineMapper, BusExamine> implements IBusExamineService {
	
	@Autowired
	BusExamineMapper busExamineMapper;

	@OperationLog(title = "创建审批意见", content = "'意见内容：' + #entity.getContent()", operationType = "0")
	@Override
    public int create(BusExamine entity) throws Exception {
		return busExamineMapper.insert(entity);
	}
	
	@Override
    public List<BusExamine> getByWorkId(int workId) {
        return busExamineMapper.selectByWorkId(workId);
    }
}
